﻿
@{
    Layout = null;
}
<link href="~/libs/layui-v2.9.21/layui/css/layui.css" rel="stylesheet" />

<form class="layui-form" action="">

    <div class="layui-form-item layui-form-text" style="width:350px;">
        <label class="layui-form-label">供应商</label>
        <div class="layui-input-block">
            <select name="suppliersname" id="suppername" lay-verify="required" lay-filter="suppername">
                <option value="">请选择供应商</option>
            </select>
        </div>
    </div>

</form>

<script src="~/libs/jquery/jquery.js"></script>
<script src="~/libs/layui-v2.5.6/layui/layui.js"></script>

<script>
	layui.use(['form', 'laydate'], function(){
	  var form = layui.form;
	  var layer = layui.layer;
	  var laydate = layui.laydate;

	  

	  //就绪函数
	  $(function(){
		  GetSuppernames()
	  })

	  //下拉框
	  function GetSuppernames(){
		  $.ajax({
			  url:'/Productionrequisition/GetSupperdatas',
			  type:'get',
			  dataType:'json',
			  async:false,
			  success:function(res){
				  $(res.data).each(function(obj){
					  $("#suppername").append('<option value="'+this.supplierName+'">'+this.supplierName+'</option>')
				  })
				  layui.form.render();
			  }
		  })
	  }

	  
	});
</script>


